const url = require('url');
let urlString = '/users?id=100'
const result = url.parse(urlString,true);

//console.log(result)
console.log(result.pathname)
console.log(result.query)